<template>
  <div class="legend-card">
    <img :src="imgUrl" :alt="name" />
    <div class="title">{{ name }}</div>
  </div>
</template>

<script>
export default {
  name: 'LegendCard',
  props: {
    name: String,
    imgUrl: String
  }
}
</script>

<style scoped lang="scss">
.legend-card {
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 10px;
  transition: all 0.5s ease;

  &:hover {
    transform: scale(1.03);
    transform-origin: bottom;
  }

  img {
    display: block;
    height: 300px;
    margin: 0 auto;
  }

  .title {
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #06151d;
    color: #fdf5e2;
    background-clip: content-box;
    padding: 0 10px;
  }
}
</style>
